home *** CD-ROM | disk | FTP | other *** search
/ Chip 2006 June / CHIP 2006-06.2.iso / program / freeware / Democracy-0.8.2.exe / xulrunner / python / compiled_templates / unittest / hide_result.py < prev    next >
Encoding:
Python Source  |  2006-04-10  |  1.7 KB  |  30 lines

  1. # This is a generated file. Do not edit.
  2. from template import Handle, fillAttr, quoteAndFillAttr, funcTable
  3. from IOBuffer import IOBuffer
  4. from xhtmltools import urlencode
  5. from templatehelper import quoteattr, escape, evalKey, toUni
  6. def fillTemplate(data, domHandler):
  7.     # Start of handle
  8.     handle = Handle(domHandler)
  9.  
  10.  
  11.     out = IOBuffer()
  12.     out.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n")
  13.     out.write(u'<html dtvPlatform="')
  14.     out.write(quoteattr(urlencode(toUni(evalKey(u'dtvPlatform',data)))))
  15.     out.write(u'" eventCookie="')
  16.     out.write(quoteattr(urlencode(toUni(evalKey(u'eventCookie',data)))))
  17.     out.write(u'" xmlns:t=')
  18.     out.write(quoteAndFillAttr(u'http://www.participatorypolitics.org/',data))
  19.     out.write(u' xmlns=')
  20.     out.write(quoteAndFillAttr(u'http://www.w3.org/1999/xhtml',data))
  21.     out.write(u'>\n<head>\n<meta content=')
  22.     out.write(quoteAndFillAttr(u'text/html; charset=utf-8',data))
  23.     out.write(u' http-equiv=')
  24.     out.write(quoteAndFillAttr(u'content-type',data))
  25.     out.write(u'></meta>\n\n</head>\n<body>\n<h1>hide test template</h1>\n\n<div>\nhideIfNotKey:true\n<span>This is an include</span>\n\n<span>This is a template include</span>\n\n<span><span>This is a database replace</span></span>\n<span><span>This is a database replace</span></span>\n</div>\n<div>\nhideIfKey:false\n<span>This is an include</span>\n\n<span>This is a template include</span>\n\n<span><span>This is a database replace</span></span>\n<span><span>This is a database replace</span></span>\n</div>\n\n</body>\n</html>')
  26.     out.close()
  27.  
  28.  
  29.     return (out, handle)
  30.